package org.example.service;

import org.springframework.data.geo.GeoResult;
import org.springframework.data.geo.Point;
import org.springframework.data.redis.connection.RedisGeoCommands;
import redis.clients.jedis.GeoUnit;

import java.util.List;

public interface GeoLocationService {

    void geoAdd(String key, double longitude, double latitude, String member);

    List<Point> geoPos(String key, String... members);

    Double geoDist(String key, String member1, String member2, GeoUnit unit);

    List<GeoResult<RedisGeoCommands.GeoLocation<String>>> geoRadius(String key, double longitude, double latitude, double radius, GeoUnit unit);

    List<GeoResult<RedisGeoCommands.GeoLocation<String>>> geoRadiusByMember(String key, String member, double radius, GeoUnit unit);

    List<String> geoHash(String key, String... members);
}
